/**
 * Created by Administrator on 2017/5/18.
 */
define([
    'regular!./index.html',
    'util/dispatcher/regularModule'
], function (template, m) {
    var SystemTab = Regular.extend({
        template: template,
        config: function (data) {
            // TODO 读取菜单，匹配url，设置open属性
            this.data = {
                menus: [{
                    title: 'Asin管理',
                    open: true,
                    children: [{
                        open: true,
                        title: 'asin列表',
                        url: '#/m/node/list/'
                    },{
                        title: '二级菜单B',
                        url: '/'
                    }]
                }, {
                    title: '一级菜单B',
                    children: [{
                        title: '二级菜单A',
                        url: '/'
                    },{
                        title: '二级菜单B',
                        url: '/'
                    }]
                }]
            };
        },
        __onRefresh : function (_options) {

        },
        listload: function (options) {

        },
        __onHide: function() {
            this.destroy();    // 起到reset的作用
        }
    });
    return m._$regist('tab-system', SystemTab);
});